<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\Resource;

class QualityCheck extends Resource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'FID'=>$this->FID,
            'BillFrom'=>$this->BillFrom,
            'QCRptNo'=>$this->QCRptNo,
            'QCDate'=>$this->QCDate,
            'OwnerID'=>$this->OwnerID,
            'OwnerName'=>$this->OwnerName,
            'KeyInID'=>$this->KeyInID,
            'keyInName'=>$this->keyInName,
            'KeyInDate'=>$this->KeyInDate,
            'keyInTime'=>$this->keyInTime,
            'LastEditMan'=>$this->LastEditMan,
            'LastEditDate'=>$this->LastEditDate,
            'AuditState'=>$this->AuditState,
            'IsDeleted'=>$this->IsDeleted,
            'SaleID'=>$this->SaleID,
            'SaleName'=>$this->SaleName,
            'ProvFID'=>$this->ProvFID,
            'PurID'=>$this->PurID,
            'PurName'=>$this->PurName,
            'QCID'=>$this->QCID,
            'QCName'=>$this->QCName,
            'QCResult'=>$this->QCResult,
            'child'=>QualityCheckChild::collection($this->child),

        ];
    }
}
